package ch8;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Array2 {
    public static void main(String[] args) {
        int []ar=new int[5];
        //ar[0]=199;
        //ar[1]=48;
        Scanner in = new Scanner(System.in);
        System.out.println("请输入数组10个值：");
        for(int i=0;i<ar.length;i++){
            ar[i]=in.nextInt();
        }
        for(int i=0;i<ar.length;i++){
            System.out.print(ar[i]+"\t");
        }
        int sum=0;
        for(int i=0;i<ar.length;i++){
            sum=sum+ar[i];
        }
        int avg=sum/ar.length;
        System.out.println("平均分是："+avg);

    }
}
